<?php
class AdmindictsController extends Controller {
	
	public function indexAction() {
		$this->_view->assignArray(array(
			'pageTitle' => 'Localization system :: Admin :: dicts',
		));
		$this->_view->render('admin/dicts/index');
	}
	
	public function addnewAction() {
		$dictName = $this->_request->getString('dictname');
		$dictionary = new Dictionary();
		$dictionary->name = $dictName;
		$dictionary->enable();
		$dictionary->save();

		$this->redirect('admindicts');
	}
}